package org.example.stockdemo.service;

import org.example.stockdemo.entity.Stock;
import org.example.stockdemo.entity.StockDetail;
import org.example.stockdemo.entity.StockIndustryRank;
import org.example.stockdemo.entity.StockRank;
import org.example.stockdemo.vo.FundTrendItemListVO;
import org.example.stockdemo.vo.StockFundFlowVO;

import java.util.List;

public interface TencentStockService {

    //    https://proxy.finance.qq.com/cgi/cgi-bin/smartbox/search?stockFlag=1&fundFlag=1&app=official_website&c=1&query=zsdl
    List<Stock> search(String stockCode);


    /**
     * 获取单只股票实时行情
     * @param stockCode
     * @return
     */
    StockDetail getRealtimeQuote(String stockCode);


    /**
     * 批量获取股票实时行情
     *
     * @param stockCodes  股票代码列表
     * @param isAddPrefix
     * @return 股票代码到实时数据的映射
     */
    public List<StockDetail> getBatchRealtimeQuotes(List<String> stockCodes, boolean isAddPrefix);

    /**
     * 获取资金排行
     *
     * @param sortType
     * @param direct
     * @param pageSize
     * @return
     * @
     */
    List<StockRank> moneyRank(String sortType, String direct, int pageSize);

    /**
     * 获取板块排行
     *
     * @param sortType
     * @param direct
     * @param pageSize
     * @return
     * @
     */
    //    https://proxy.finance.qq.com/cgi/cgi-bin/rank/pt/getRank?board_type=hy2&sort_type=priceRatio&direct=up&offset=0&count=10
    List<StockIndustryRank> industryRank(String sortType, String direct, int pageSize);


    StockFundFlowVO getTodayFundFlow(String stockCode);

    /**
     * 获取股票1分时线数据
     *
     * @param fullStockCode
     * @return
     */
    FundTrendItemListVO getMinuteData(String fullStockCode);

    List<StockDetail> getKlineData(String stockCode, int day);
}